package Summative;

public class VectorCalculations
{
  public static Vector addVector(Vector one, Vector two)
  {
    int outputXinit = one.getStrtX();
    int outputYinit = one.getStrtY();
    int outputXfin = two.getEndX();
    int outputYfin = two.getEndY();
    
    Vector output = new Vector(outputXinit, outputYinit, outputXfin, outputYfin);
    
    return output;
  }
  
  public static Vector subtractVector(Vector one, Vector two)
  {
    int outputXinit = one.getStrtX();
    int outputYinit = one.getStrtY();  
    int outputXfin = (two.getStrtX() - (two.getEndX() - two.getStrtX()));
    int outputYfin = (two.getStrtY() - (two.getEndY() - two.getStrtY()));
    
    Vector output = new Vector(outputXinit, outputYinit, outputXfin, outputYfin);
    
    return output;
  }
}